package jay.home.bet.web.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jay.home.bet.domain.Event;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class CloseEventAction extends BaseAction
{
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		String id = request.getParameter("id");
		
		System.out.println(id);
		
		Event event = getOddsService().getEvent(id);
		
		event.setAlive(false);
		getOddsService().updateEvent(event);
		
		return null;
	}
}
